package com.example.mp.intercept;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

@Component
public class MyMetaObjectHandler implements MetaObjectHandler {

    @Override
    public void insertFill(MetaObject metaObject) {
        
    }

    @Override
    public void updateFill(MetaObject metaObject) {
        // 填充字段 state 的值
        this.strictUpdateFill(metaObject, "state", Integer.class, 6);
    }
}
